//
// IUT de Nice / Departement informatique / Module APO Java
// Annee 2011_2012 - Package _Himalaya
//
// Classe Sentier
//
// Auteur : A. Fourrier
//

import java.*;
import java.util.*;

public class T_Sentier_N2 {

   public static void main (String[] args)  throws Throwable {

      Tests.Begin("_Himalaya.Sentier", "1.0.0");

         Tests.Design("Controle des methodes", 3); {

           Tests.Case("Controle methode clone"); {
            	Village v1 = null;
            	Village v2 = null;
            	Sentier s1 = null;
            	Sentier s2 = null;
            	LinkedList l1=null;
				try{
					v1 = new Village(1,1,l1);
            		v2 = new Village(2,1,l1);
					s1 = new Sentier ("glace",v1,v2);
					s2 = (Sentier)s1.clone();
				}
				catch (Throwable t){}
				Tests.Unit("glace",s2.getType());
            }

            Tests.Case("Controle methode equals"); {
            	Village v1 = null;
            	Village v2 = null;
            	Sentier s1 = null;
            	Sentier s2 = null;
            	LinkedList l1=null;
				try
				{
					v1 = new Village(1,1,l1);
            		v2 = new Village(2,1,l1);
					s1 = new Sentier ("terre",v1,v2);
					s2 = new Sentier ("glace",v2,v1);

				}
				catch (Throwable t){}
				Tests.Unit(true,s1.equals(s1));
				Tests.Unit(false,s2.equals(s1));
            }

            Tests.Case("Controle methode toString"); {
            	Village v1 = null;
            	Village v2 = null;
            	Sentier s1 = null;
            	LinkedList l1=null;
				try
				{
					v1 = new Village(1,1,l1);
            		v2 = new Village(2,1,l1);
					s1 = new Sentier ("pierre",v1,v2);
				}
				catch (Throwable t){}
				Tests.Unit("[1]pierre[2]",s1.toString());
            }
         }

      Tests.End();
   }
}